package com.wiscamp.ninechapters.problems.application.assemblers;

import com.wiscamp.ninechapters.problems.application.dto.vo.reports.ReportAnswerVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.reports.ReportProblemVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.reports.ReportQuestionVO;
import com.wiscamp.ninechapters.problems.application.dto.vo.reports.TaskReportVO;
import com.wiscamp.ninechapters.problems.domain.models.reports.ReportAnswer;
import com.wiscamp.ninechapters.problems.domain.models.reports.ReportProblem;
import com.wiscamp.ninechapters.problems.domain.models.reports.ReportQuestion;
import com.wiscamp.ninechapters.problems.domain.models.reports.TaskReport;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface TaskReportAssembler {
    TaskReportAssembler Instance = Mappers.getMapper(TaskReportAssembler.class);

    TaskReportVO toTaskReportVO(TaskReport entity);

    ReportProblemVO toReportProblemVO(ReportProblem entity);

    ReportQuestionVO toReportQuestionVO(ReportQuestion entity);

    ReportAnswerVO toReportAnswerVO(ReportAnswer entity);
}
